<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>FacesBaby</title>
<script type="text/javascript" src="Public/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="Public/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="Public/js/lazyload.js"></script>
<script type="text/javascript" src="Public/artDialog/artDialog.source.js?skin=default" charset="utf-8"></script>
<script type="text/javascript" src="Public/js/jquery.ae.image.resize.min.js"></script>
<script type="text/javascript" src="Public/js/jquery.date.js"></script>
<script type="text/javascript" src="Public/js/jquery-anchorGoWhere.js"></script>
<script type="text/javascript" src="Public/js/jquery.md5.js"></script>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="stylesheet" href="/Public/bootstrap/css/bootstrap.css">
<link rel="stylesheet" href="/theme/default/css/common.css">

  <!--[if lte IE 6]>
  <link rel="stylesheet" type="text/css" href="/Public/bootstrap/css/bootstrap-ie6.css">
  <![endif]-->
  <!--[if lte IE 7]>
  <link rel="stylesheet" type="text/css" href="/Public/bootstrap/css/ie.css">
  <![endif]-->
<link rel="stylesheet" href="Public/css/homeindex.css">

<style type="text/css">
body, h1, h2, h3, h4, h5, h6, dl, dt, dd, ul, ol, li, th, td, p, blockquote, pre, form, fieldset, legend, input, button, textarea, hr {
margin: 0;
padding: 0;
}


#hd{
width: 950px;
margin: 0 auto;	
}
.bd{
clear: both;
}
#fb_intr{
position: relative;
overflow: hidden;
width:590px;
height: 134px;
font-size: 14px;
color: #666;
line-height: 1.6;
background:#BBD8E9;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
float:left;
}
#fb_intr strong {
float: left;
width: 180px;
height: 80px;
text-align: center;
font-size: 24px;
padding-top: 46px;
}
#fb_intr .fb-info {
padding: 22px 0 18px 0;
}

#fb_intr .lnk-reg strong {
float: none;
color: white;
padding: 0;
font-size: 16px;
font-weight: 400;
margin: 0 10px 0 16px;
}

#fb_login{background:#DCEAF4; height:130px; overflow:hidden;
float: right;
margin-left: 4px;
width: 356px;
height: 134px;
/*background: #E9EEF2;
*/border-top-right-radius: 5px;
border-bottom-right-radius: 5px;}
#fb_login .item {
margin-bottom: 10px;
}
#fb_login .item label {
float: left;
padding: 3px;
letter-spacing: 10px;
color: #333;
}

#fb_login form {
position: relative;
padding: 14px 0 0 20px;
}
.controls{height:30px;}
.item1{
float: left;
font-size: 12px;
margin: 0 20px 10px 0;
color: #666;	
}
.item1 label{
margin-left: 4.5em;
margin-top: 4px;	
}

.photo_figure{
width:960px;
overflow:hidden;
margin:0 auto;
position:relative;
}
.figure_area {
min-width: 270px;
_width: 270px;
width:690px;
height: 580px;
position: relative;
overflow: hidden;
float:left;
}
#gallery li{
	float:left;
	list-style:none;
}
a.link_view:link,a.link_view:visited{
	display:block;
	border:2px solid #ff6600;
}

.figure_side {
text-align: left;
width: 220px;
height: 580px;
padding: 0 25px;
overflow-y: auto;
overflow-x: hidden;
position: absolute;
right: 0;
top: 0;
background: #ECECEC;
}
.figure_slidview{
width:950px;
overflow:hidden;
margin:0 auto;
height: 55px;
}

#tooltip{ 
position:absolute; 
border:1px solid #333; 
background:#f7f5d1; 
padding:2px 5px; 
color:#333; 
display:none; 
}
.left-img{
cursor:url(/Public/images/pre.cur),auto;	
}
.right-img{
	cursor:url(/Public/images/next.cur),auto;
}
.photo_layer_close {
position: absolute;
z-index: 10;
right: -8px;
top: -8px;
height: 40px;
width: 40px;
line-height: 150px;
overflow: hidden;
}
.photo_layer_close a {
display: block;
height: 42px;
width: 42px;
overflow: hidden;
background-image: url(/Public/images/photo_scan_layer-32.png);
background-position: 0 0;
_background-image: url(/Public/images/photo_scan_layer-ie6.png);
_background-position: 0 0;
cursor: pointer;
}

.figure_side .user {
padding: 25px 0 8px;
width: 220px;
padding-bottom: 7px;
border-bottom: solid 1px #E0E0E0;
}
.figure_side .user_img {
width: 40px;
float: left;
}
.figure_side .user_img a {
display: block;
height: 40px;
width: 40px;
}
.figure_side .user_photo_details {
float: left;
margin-left: 10px;
width: 155px;
line-height: 19px;
}
.figure_side .user_photo_details p {
white-space: nowrap;
width: 152px;
overflow: hidden;
text-overflow: ellipsis;
}
.figure_side .figure_description {
line-height: 24px;
margin-bottom: 6px;
width: 220px;
position: relative;
}
.detailStats {
height: 34px;
}	
.sendButton {
float: right;
}	
.addComment {
height: 40px;
background: white;
margin-bottom: 5px;
width: 208px;
padding: 5px;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 12px;
line-height: 18px;
color: #333;
outline: none;
resize: none;
}


.guess-list {
overflow: hidden;
border: 1px solid #EEEBE7;
border-top: 0;
border-left: none;
/*width:654px;*/
margin:0 auto;
}

.item-a, .item-b, .item-c {
margin-bottom: -1000px;
padding-bottom: 1000px;
border-top: 1px solid #EEEBE7;
background: url(/Public/images/bg_line.png) repeat-y 0 0;
}
.item-b, .item-c {
display: inline-block;
zoom: 1;
vertical-align: top;
letter-spacing: normal;
word-spacing: normal;
*display:inline; 
*zoom:1;
}
.main{margin-top:10px;}
.guess-list .item-a, .guess-list .item-c {
width: 218px;
overflow: hidden;
_width:200px

}
.guess-list .online-desc .pics {
letter-spacing: -0.31em;
word-spacing: -0.43em;
margin:0 0 15px 25px
}
.guess-list .online-desc .pics li {
display: inline-block;
width:52px;
max-height: 50px;
_height: 50px;
overflow: hidden;
letter-spacing: normal;
word-spacing: normal;
font-size: 0;
vertical-align: top;
margin: 0 4px 4px 0;
list-style:none;
*display:inline; 
*zoom:1; 
}
.guess-list .online-desc .pics li img{
width:50px;
height:38px;
opacity:0.6;
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=40);
border:1px solid #ccc;
    -moz-box-shadow:0px 0px 10px #111;
    -webkit-box-shadow:0px 0px 10px #111;
    box-shadow:0px 0px 10px #111;

}
.guess-list .title {
margin: 0 0 12px 0;
color: #666;
line-height: 1.4;
}
h3 {
height: 26px;
margin-left: 4px;
font: 14px Arial,Helvetica,sans-serif;
color: #666;
margin-bottom: 1px;
line-height: 1.62;
background-color: #F2FBF2;
}
.guess-list .group h3 {
height: auto;
margin: 0;
line-height: 1.3;
background: 0;
color: #333;
}
.guess-list .source {
margin-top: 10px;
color: gray;
}
.guess-list .title {
margin: 0 0 12px 0;
color: #666;
line-height: 1.4;
}
.guess-list .fav-btn {
padding: 0 25px 25px 25px;
margin-top: -10px;
white-space: nowrap;
}
.fav-btn a {
display: inline-block;
zoom: 1;
padding: 5px 6px;
line-height: 1.2;
font-weight: 800;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
-o-border-radius: 2px;
border-radius: 2px;
}
.fav-btn a:link, .fav-btn a:visited {
color: #CA6445;
background: #FAE9DA;
}

.day_info {
padding: 0 12px 16px 25px;
line-height: 22px;
border-bottom: 1px solid #C3C3C3;
zoom: 1;
}
.day_num {
line-height: 102px;
font-size: 64px;
}

.child-intrduce{
overflow:hidden;
margin:10px 0 10px 10px;
}
.child-intrduce .user{
float: left;	
}
.child-intrduce .m_thumb_d {
width: 80px;
float: left;
}
.child-intrduce .m_thumb_d img {
width: 80px;
height: 80px;
}
.child-intrduce .user_info {
width: 170px;
padding: 0 0 0 10px;
float:left;
}
.about,.location {
padding: 0;
}

.child-intrduce .static_num {
padding: 5px 0 0;
width:170px;
overflow: hidden;
}
.child-intrduce .static_num dl {
float: left;
width: 72px;
height: 50px;
text-align: center;
line-height:15px;
}
.child-intrduce .user .static_num dl {
width: 56px;
height: 42px;
}
.M_dotted_y, .M_dotted_x {
background: url(http://img2.app.wcdn.cn/ops/photo/style/images_v5/common/dotted.gif?v=20130128) repeat-y 0 0;
}

.box{
clear: both;
position: relative;
margin-bottom: 8px;	
}

.title-bar {
color: white;
background-color: #224272;
background-image: -webkit-linear-gradient(top,#5B6E8D 0,#576B8B 12%,#4C6386 24%,#39547D 35%,#35517B 37%,#2C4A77 47%,#244473 64%,#224272 100%);
background-repeat: repeat-x;
background-size: 1px 45px;
-webkit-border-top-left-radius: 5px;
-moz-border-radius-topleft: 5px;
border-top-left-radius: 5px;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topright: 5px;
border-top-right-radius: 5px;
}
.title-bar h2 {
font-weight: bold;
font-size: 14px;
line-height: 14px;
padding: 5px 0 5px 12px;
text-shadow: 1px 1px 1px #224272;
}


.box > .box-content {
background: white;
border: 1px solid #CCC;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0 1px 0 rgba(0,0,0,0.3);
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
overflow:hidden
}
.box > .title-bar + .box-content, .box > .box-heading + .box-content {
border-top: 0;
-webkit-border-top-left-radius: 0;
-moz-border-radius-topleft: 0;
border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-moz-border-radius-topright: 0;
border-top-right-radius: 0;
}
.box > .box-content {
-webkit-box-shadow: 0 0;
-moz-box-shadow: 0 0;
box-shadow: 0 0;
}

.box > .box-content .content-detail{
padding: 8px 11px 8px 12px;
}
.box > .box-content .content-detail .content-dt-weekly{
	
}

.weekly-list-s {
width: 238px;
clear: both;
zoom: 1;
}
.weekly-list-s dt {
float: left;
display: inline;
width: 40px;
text-align: right;
margin: 0 4px 5px;
color: #999;
font-size:12px
}
.weekly-list-s dd {
float: left;
display: inline;
width: 71px;
margin: 0 0 5px;
color: #999;
}
.weekly-list-s dd a {
background-color: #FFE6CA;
float: left;
display: inline;
width: 12px;
text-align: center;
color: #666;
margin: 0 0 0 1px;
}

.figure_area_handle {
height: 37px;
width: 150px;
position: absolute;
bottom: 0;
left: 50%;
margin-left: -75px;
}
.figure_area_handle p {
float: left;
width: 50px;
height: 37px;
cursor: pointer;
}
.figure_area_handle p a {
display: block;
height: 37px;
width: 50px;
overflow: hidden;
background: #000;
filter: Alpha(Opacity=60);
opacity: .6;
cursor: pointer;
}
.figure_area_handle p.left_rotation a span {
	display:block;
width: 27px;
height:24px;
margin: 7px 11px 0;
background-image: url(/Public/images/photo_scan_layer-32.png);
background-position: -82px -25px;
_background-image: url(/Public/images/photo_scan_layer-ie6.png);
_background-position: -41px -50px;
}
.figure_area_handle p.right_rotation a span {
		display:block;
width: 27px;
height:24px;
margin: 7px 13px 0;
background-image: url(/Public/images/photo_scan_layer-32.png);
background-position: -138px -25px;
_background-image: url(/Public/images/photo_scan_layer-ie6.png);
_background-position: -42px -96px;
}
.figure_area_handle p.left_rotation a:hover span {
background-image: url(/Public/images/photo_scan_layer-32.png);
background-position: -110px -25px;
_background-image: url(/Public/images/photo_scan_layer-ie6.png);
_background-position: -42px -73px;
}
.figure_area_handle p.right_rotation a:hover span {
background-image: url(/Public/images/photo_scan_layer-32.png);
background-position: -166px -25px;
_background-image: url(/Public/images/photo_scan_layer-ie6.png);
_background-position: -42px -119px;
}

.bigPhoto {
position: absolute;
top: 0;
left: 25px;
width: 612px;
height: 612px;
padding: 14px;
cursor: pointer;
}
.pic-load {
z-index: 8007;
position: absolute;
top: 305px;
left: 305px;
}
a.user-avatar:link img ,a.user-avatar:visited img {
display: block;
width: 80px;
height: 80px;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-ms-border-radius: 50%;
-o-border-radius: 50%;
border-radius: 50%;
border: solid 4px #eee;
}
</style>

<style type="text/css">
.group{zoom:1;}
.section{clear:both;padding:0}
.col {
float: left;
}

.structure-calendar{
	max-width:990px;
	width:78%;
	_width:990px;
	margin:0 auto;
	_padding-top:0;
	overflow:hidden
}

.structure-calendar .sec-main {
width: 65.7%;
background:#fff
}
.col:first-child {
margin-left: 0;
}
.sec-main {
width: 75%;
}
.mix-calendar {
position: relative;
max-height: 465px;
_height: 465px;
overflow: hidden;
}
.mix-calendar ul li {
float: left;
display: inline;
width: 20%;
height: 130px;
}
.mix-calendar ul li.first-li {
width: 40%;
background: #ff8272;
}

.title-1 {
font-size: 12px;
text-align: right;
width: 44%;
line-height: 20px;
vertical-align: top;
margin-top: 35px;
margin-bottom: 57px;
color: #fff;
overflow: hidden;
}
.title-2 {
font-size: 28px;
text-align: left;
width: 54%;
line-height: 40px;
vertical-align: top;
margin-top: 58px;
margin-bottom: 57px;
color: #fff;
overflow: hidden;
}

.dib {
display: inline-block;
}

.mix-calendar ul li a {
position: relative;
display: block;
width: 100%;
height: 100%;
overflow: hidden;
}

.mix-calendar ul li a small {
position: absolute;
top: 12px;
left: 7px;
color: #fff;
font: bold 56px/58px helvetica,sans-serif;
line-height: 42px;
z-index: 40;
}

.calendar_pic {
width: 100%;
height: 100%;
}
.mix-calendar ul li a .details {
position: absolute;
opacity: .6;
filter: alpha(opacity=60);
top: 0;
left: 0;
margin-top: 100px;
width: 100%;
height: 100%;
text-align: left;
color: #fff;
-webkit-transition: margin-top;
-webkit-transition-timing-function: ease-out;
-webkit-transition-duration: 200ms;
-moz-transition: margin-top;
-moz-transition-timing-function: ease-out;
-moz-transition-duration: 200ms;
-o-transition: margin-top;
-o-transition-timing-function: ease-out;
-o-transition-duration: 200ms;
overflow: hidden;
background-color: #000;
}
.mix-calendar ul li a .details_inner {
padding-left: 0;
}
.mix-calendar ul li a .details h5 {
display: block;
margin-top: 0;
margin-bottom: 0;
color: #fff;
height: 30px;
line-height: 30px;
white-space: nowrap;
text-overflow: ellipsis;
width: 100%;
font-size:12px;
font-weight:normal;
overflow: hidden;
text-align:center
}
.mix-calendar ul li a .details h5 span {
font-weight: normal;
font-size: 16px;
}



img {
width: auto\9;
height: auto;
max-width: 100%;
vertical-align: top;
-ms-interpolation-mode: bicubic;
}

.sec-sidebar {
width: 25%;
height: 388px;
background: #fff;
margin-left:30px;
border:1px solid #ccc;
overflow:hidden
}
.sec-sidebar .sec-sidebar-inner {
padding-right: 3%;
margin-left: 8%;
}

.structure-calendar .login-box {
background: #fff;
padding: 6% 8% 6% 9%;
}
div.wform-bobao-login {
width: 100%;
padding: 0;
}
div.wform-bobao-login * {
_zoom: 1;
}
.wform-bobao-login .login-tips {
color: #666;
font-size: 14px;
margin-bottom: 5px;
}
.wform-bobao-login .split-line {
height: 0;
width: 100%;
margin-bottom: 25px;
margin-top: 25px;
border-bottom: 1px solid #f2f2f2;
position: relative;
}
.wform-bobao-login .split-line .or {
position: absolute;
width: 20px;
height: 20px;
line-height: 20px;
background: #fff;
left: 44%;
top: -9px;
text-align: center;
}

div.wform-babao-login .form-split{
	width:100%	
}

.wform-item{margin-bottom:10px; position:relative}
.wform-ipt{
	position:relative
}
div.wform-bobao-login .form-split .wform-ipt{
	padding-bottom:0
}
.wipt {
background: 0;
border: 0 none;
font-size: 13px;
height: 18px;
outline: 0;
padding: 8px 20px 9px;
position: relative;
width: 260px;
background-color: rgba(255,255,255,0.7);
filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,startColorStr='#B2FFFFFF',endColorstr='#B2FFFFFF');

}
.wform-bobao-login .wipt {
width: 89%;
padding: 8px 5% 9px;
border: 1px solid #bfbfbf;
}
div.wform-bobao-login .wform-checkcode{
	display:block;
}
.wform-checkcode .wform-link img {
margin-right: 8px;
}

.wform-link {
color: #666;
cursor: pointer;
display: inline-block;
height: 18px;
vertical-align: middle;
white-space: nowrap;
}
.wform-checkcode .wform-link{
	height:35px;
	line-height:35px;
}
div.wform-bobao-login .wform-checkcode .wform-link{
	vertical-align: middle;
}
div.wform-babao-login .valid-msg-panel{
	color:#ff0018;
	margin-bottom:3px;
}
div.wform-babao-login .valid-msg-panel .valid-msg-node{
	display:block;
}
div.wform-bobao-login .wform-checkbox {
margin-top: 10px;
margin-bottom: 1px;
}
div.wform-bobao-login .wform-checkbox .forget-pwd {
float: right;
margin-top: 2px;
}
.wform-checkbox .checkbox {
display: inline-block;
cursor: pointer;
padding-left: 15px;
margin-right: 3px;
vertical-align: middle;
white-space: nowrap;
}


.wform-checkbox .checkbox .control {
background: url(http://img01.taobaocdn.com/tps/i1/T17P4wXp8iXXXYQeo.-12-40.png) no-repeat 0 4px;
float: left;
height: 18px;
margin-left: -15px;
outline: 0;
width: 16px;
}
.wform-checkbox .checkbox .checked {
background-position: 0 -16px;
}

#fm-login-submit{
	width:100%;
	margin-top:10px;	
}
.fm-button {
height: 30px;
border: 1px solid #e87b0e;
font-size: 14px;
font-weight: 700;
text-align: center;
color: #fff;
cursor: pointer;
background: url("Public/images/login-btn.png") repeat-x 0 -1px;
font-family: Microsoft YaHei,Hiragino Sans GB,\5b8b\4f53;
-webkit-box-shadow: 0 1px 1px #ebe7e6;
-moz-box-shadow: 0 1px 1px #ebe7e6;
-ms-box-shadow: 0 1px 1px #ebe7e6;
-o-box-shadow: 0 1px 1px #ebe7e6;
box-shadow: 0 1px 1px #ebe7e6;
zoom: 100%;
_overflow: visible;
}

div.wform-bobao-login .disable {
margin-right: 36px;
background-color: #b3bfc0;
}


.wform-bobao-login .other-lg-btn-box .lg-btn {
display: block;
width: 40%;
height: 28px;
float: left;
border: 1px solid #ccc;
border-radius: 3px;
line-height: 28px;
text-align: center;
color: #f1612e;
overflow: hidden;
}
.wform-bobao-login .xinlang {
margin-right: 17%;
}
.icon {
display: inline-block;
width: 16px;
height: 16px;
line-height: 99em;
overflow: hidden;
vertical-align: middle;
margin-right: 3px;
}
.wform-bobao-login .xinlang .icon {
background: url(http://gtms01.alicdn.com/tps/i1/T1xYYCFmhXXXcu5FDa-20-20.png) no-repeat;
vertical-align: text-top;
}

img:hover{ -webkit-transition: -webkit-transform 0.4s ease; -moz-transition: -moz-transform 0.4s ease; -ms-transition: -ms-transform 0.4s ease; transform:scale(1.04, 1.04);-ms-transform:scale(1.04, 1.04); -webkit-transform:scale(1.04, 1.04);}

</style>

<script type="text/javascript">
var dialog;
function FoucsDialog(){
	dialog = art.dialog({
		title:"关注我的",
		width: 722,
    	height: 452,
		lock:true,
		button:{
			name:'关闭'	
		}
	});
	$.ajax({
		url: 'index.php?s=/Home/Baby/Follower/babyid/{$_SESSION['session_babyid']}',
		success: function (data) {
			dialog.content(data);
		},
		cache: false
	});				
}

function LikeDialog(){
	dialog = art.dialog({
		title:"Like",
		width: 722,
    	height: 452,
		lock:true,
		button:{
			name:'关闭'	
		}
	});
	$.ajax({
		url: 'index.php?s=/Home/Baby/Likes/babyid/{$_SESSION['session_babyid']}',
		success: function (data) {
			dialog.content(data);
		},
		cache: false
	});				
}





</script>

</head>

<body>


    


       
<div style="display:none" id="bootDialog">
	<div class="photo_figure">
    <div class="photo_layer_close"><a onClick="dialog.close();" href="javascript:void(0)" title="关闭">关闭</a></div>
    <div class="figure_main">
    
    	<div class="figure_area">
        
        <div class="figure_img" id="_slideView_imgContainer" style=" position:relative;text-align:center">
        	
        </div>
          
        
        </div>
        <div class="figure_side" style="overflow:hidden">
        
        
        <div class="clear user" id="_slideView_userinfo" style="height:40px"><p class="user_img">
        
        <a href="index.php?s=/Home/Baby/Profile" target="_blank" title="点击查看宝宝信息"><img style="width:40px;height:40px" src="<?php if(empty($_SESSION['session_fb'][0]['baby_icon'])){echo 'Public/images/smile.png';}else{echo $_SESSION['session_fb'][0]['baby_icon'];}?>"></a>
        
        
        </p><div class="user_photo_details"><p><a href="/index.php?s=/Home/Baby/setting/BB/<?php echo $_SESSION['session_fb'][0]['baby_id']?>" target="_blank" class="user_nickname"><?php echo $_SESSION['session_fb'][0]['baby_realname']?></a></p><p><strong id="dateDetail"></strong></p></div></div>
        
        <div class="figure_description c_tx2" id="_slideView_description" style="height: 48px; overflow: hidden;"><div id="_slideView_description_inner"><div class="qz_311_content" id="photo_topic"></div></div></div>
        
        <div class="detailStats">
                <div class="btn-group">
                    <input type="hidden" id="likeVal"><a class="btn btn-danger likeDropDownButton likeButton tooltipBtn" href="javascript:Like(this);" id="likeBtn">
                    	<i class="icon-heart icon-white"></i>
                        <span id="likeit_num"></span></a>
                    <a onclick="likelist($('#likeVal').val())" class="btn dropdown-toggle" data-toggle="dropdown">
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu" id="dropdown-menu"></ul>
                </div>
<script type="text/javascript">
function postcomment(){
	//addComment
	var id = $('#likeVal').val();
	var comment = $.trim($("#addComment").val());
	$.ajax({
		type:"POST",
		url:"/index.php?s=/Home/Comment/PostComment",
		dataType:"json",
		data:"photoid="+id+'&comment='+comment+'&tp='+new Date().getTime(),
		success:function(json){
			if(json['flag']=='success'){
				listcomment(id);
			}else if(json['flag']=='fail'){
				alert('评论失败!');
			}
		}
	});
}
function listcomment(id){
//列出该相片的评论
var photoid = $('#likeVal').val();	
$.ajax({
type:"GET",
url:"/index.php?s=/Home/Comment/ListComment/photoid/"+id+"/tp/"+new Date().getTime(),
dataType:"json",
success:function(json){
	var str = '';
	if(json.length>0){
	$.each(json,function(dataIndex,data){
		if(data['user_id']=='{$_SESSION["session_id"]}'){
		str+='<div class="comment"><span>'+data['realname']+':</span>'+data['memo']+'<a onclick="delComment(\''+data['id']+'\')" href="javascript:void(0)">删除</a></div>';
		}else{
			str+='<div class="comment"><span>'+data['realname']+':</span>'+data['memo']+'</div>';
		}
	});
	}else{
		str = '<div class="comment">暂时还没有评论!</div>';
	}
	$('#detailComments').html(str);
}
});
}
function getPreComment(){
	$("#loadingComments").show();
	$("#showAllComments").hide();
	var photoid = $('#likeVal').val();
	$.ajax({
type:"GET",
url:"/index.php?s=/Home/Comment/ListComment/photoid/"+photoid+"/tp/"+new Date().getTime(),
dataType:"json",
success:function(json){
	var str = '';
	if(json.length>0){
	$.each(json,function(dataIndex,data){
		if(data['user_id']=='{$_SESSION["session_id"]}'){
		str+='<div class="comment"><span>'+data['realname']+':</span>'+data['memo']+'<a onclick="delComment(\''+data['id']+'\')" href="javascript:void(0)">删除</a></div>';
		}else{
			str+='<div class="comment"><span>'+data['realname']+':</span>'+data['memo']+'</div>';
		}
	});
	}else{
		str = '<div class="comment">暂时还没有评论!</div>';
	}
	$("#loadingComments").hide();
	$("#showAllComments").show();
	$('#detailComments').html(str);
}
});
}
</script>

                <a onclick="postcomment()" href="javascript:void(0)" class="sendButton btn btn-success"><i class="icon-comment icon-white"></i>评论</a>
            </div>
            
            <div class="addCommentContainer">
                <textarea class="addComment" cols="20" id="addComment" name="addComment" placeholder="评论" rows="2"></textarea>
                <div id="loadingComments" class="loadingComments" style="display:none">
                    <img src="/Public/images/ajax-loader-arrow.gif" alt="">
                </div>
                <a onclick="getPreComment();" href="javascript:void(0);" id="showAllComments" class="showAllComments" style="display: block;"><i class="icon-chevron-down"></i>查看所有评论</a>
            </div>
            
            <div class="detailComments" id="detailComments" style="height:295px;overflow:hidden;padding:0px;width:230px;">
            	
            </div>
        
        </div>
    </div><!--end figure_main-->  
    <div class="figure_slidview clearfix">
    <ul id="gallery" style=" position:absolute"></ul>
    </div>
    </div><!--end figure-->
</div>

<?php
if(!isset($_SESSION['Login_flag'])){
?>
<include file="./template/default/Public/header-without-login.html" />
<?php
}else{
?>
<include file="./template/default/Public/header-logined.html" />
<?php
}
?>





<?php
if(!isset($_SESSION['Login_flag'])){
?>
<div class="structure-calendar group section">
	<div class="col sec-main">
    	<div class="mix-calendar">
        	<ul>
            	<li class="first-li">
                	<span class="title-1 dib">
                    	用日历<br>
                        记录宝宝的成长过程!
                        把宝宝的每一个<br>成长瞬间都定格下来!
                    </span>
                    
                    <span class="title-2 dib">FacesBaby</span>
                </li>
                <?php
                for($i=0;$i<=12;$i++){
                ?>
                <?php
                if($i%2==0){
                ?>
                <li class="even">
                	<a href="javascript:void(0)" id="month_{$i}">
                                   
                    <!--<img src="Public/images/pre_load.png" class="calendar_pic" alt="">-->
                    <div class="details">
                    	<div class="details_inner">
                        <h5 id="shootDate_{$i}"></h5>
                        </div>
                    </div>
                	</a>
                </li>
                <?php
                }else{
                ?>
                <li>
                    <a href="javascript:void(0)" id="month_{$i}">
                        <!--<img src="Public/images/pre_load.png" class="calendar_pic" alt="">-->
                        <div class="details">
                            <div class="details_inner">
                            <h5 id="shootDate_{$i}"></h5>
                            </div>
                        </div>
                    </a>
            	</li>                
                <?php
                }
                ?>
                <?php
                }
                ?>
            </ul>
        </div><!--end mix-calendar-->
    
    </div><!--end sec-main-->
    
    <div class="col sec-sidebar">
    	<div class="login-box">
        	<div class="wform-bobao-login">
            	<div class="form-sign-in">
                	<p class="login-tips">使用合作账号登陆:<a href="index.php?s=/Home/Sina/callback" class="lg-btn xinlang"><i class="icon"></i>新浪微博</a></p>
                    	<!--<div class="other-lg-btn-box clearfix">
            <a href="/user/jump.php?t=sina" class="lg-btn xinlang"><i class="icon"></i>新浪微博</a>
            <a href="/user/jump.php?t=taobao" class="lg-btn"><i class="iconfont">Ƹ</i>淘宝账号</a>
        </div>
        <div class="split-line"><div class="or">或</div></div>-->
        
        <p class="login-tips">使用FacesBaby账号登录</p>
        <form method="post" action="index.php?s=/Home/User/doLogin" id="login_form" onSubmit="return chkPost()">
        <div class="form-split">
        	<div class="wform-item wform-ipt">
            	<input type="text" name="email" id="email" class="wipt" style="border-radius:0px;line-height:16px;padding:8px 10px 9px 9px; width:92%;" placeholder="手机/邮箱">
            </div>
            <div class="wform-item wform-ipt wform-pwd-panel">
            	<input name="pwd" id="pwd" type="password" class="wipt" style="border-radius:0px;line-height:16px;padding:8px 10px 9px 9px; width:92%;" placeholder="输入密码">
            </div>
            <div class="wform-item wform-ipt wform-checkcode wform-pwd-panel" style="">
                <input name="checkcode" id="checkcode" class="wipt" type="text" placeholder="输入验证码" style="width:70px">
                <a onClick="RefleshVerify()" href="javascript:void(0)"><img src="index.php?s=/Home/User/verify" width="69" style="vertical-align:middle" id="verifyImg">换一换</a>
            </div>
            <div class="valid-msg-panel">
                <div class="valid-msg-node" id="valid-msg-node" style="display: none;"></div>
            </div>
            <div class="wform-item wform-checkbox controls clearfix bx-controls" bx-name="form" id="brix_brick_62" bx-behavior="true">
                <a class="wform-link forget-pwd" href="index.php?s=/Home/User/ForgetPassword" target="_blank">忘记密码？</a>
                <label class="checkbox" for="checkbox1"><span class="control checked" tabindex="0"></span><input type="checkbox" name="remember_me" id="checkbox1" value="true" checked="checked">下次自动登录</label>
            </div>
            <div class="wform-item">
                  <input type="hidden" name="url" value="<?php echo $_GET['url'];?>">
            <button type="submit" class="fm-button fm-submit" id="fm-login-submit">登&nbsp;&nbsp;&nbsp;&nbsp;录</button>

            </div>
            
        </div>
        </form>
        <p style="font-size:12px;">
        还没有FacesBaby账号?<a target="_blank" href="index.php?s=/Home/User/signup">注册一个</a>
        </p>
        
                </div>
            </div>
        </div>
    </div>

</div><!--end structure-calendar-->

<script type="text/javascript">
function RefleshVerify(){ 
//重载验证码
var timenow = new Date().getTime();
document.getElementById("verifyImg").src='index.php?s=/Home/User/verify/id='+timenow;
}
function photoIndexList(){
	
	$.ajax({
		url:"index.php",
		type:"GET",
		data:"s=/Home/IndexData/randIndex/",
		dataType:"json",
		success:function(json){
			$.each(json,function(dindex,data){
				
				$("#month_"+dindex+"").append('<img src="http://facesbaby.u.qiniudn.com/'+data['photo_path']+'?imageView/1/w/129/h/130" class="calendar_pic">');
				$("#shootDate_"+dindex).html("摄于:"+data['photo_year']+"年"+data['photo_month']+"月"+data['photo_day']+"日");
			});
		
		}});
}
var reg_phone=/^0?(13[0-9]|15[012356789]|18[0236789]|14[57])[0-9]{8}$/;
var reg_email=/^[a-zA-Z0-9]{1}([\._a-zA-Z0-9-]+)(\.[_a-zA-Z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+){1,3}$/;
var global_chk = false;

function chkInput(obj){
	
}

function chkPost(){
	var email = $.trim($("#email").val());
	var pwd = $.trim($("#pwd").val());
	var checkcode = $.trim($("#checkcode").val());
	//	if($.trim(form.realname.value)==""&&!reg_phone.exec($.trim($('#phone').val()))&&!reg_email.exec($.trim($('#email').val()))){

		if(!reg_phone.exec(email)&&!reg_email.exec(email)){
			$("#valid-msg-node").show();
			$("#valid-msg-node").html("<span>账号格式为email或手机号码!</span>");
			$("#email").css("border","1px solid #ff6600");
			$("#email").focus();
			return false;
		}else{
				$("#email").css("border","1px solid green");
				$("#valid-msg-node").html("<span>账号格式正确!</span>");
		}
		if(pwd==""){
			$("#valid-msg-node").show();
			$("#valid-msg-node").html("<span>密码不能为空!</span>");
			$("#pwd").css("border","1px solid #ff6600");
			$("#pwd").focus();
			return false;
		}else{
			$("#pwd").css("border","1px solid green");
			$("#valid-msg-node").html("<span>密码格式正确!</span>");
		}
		if(checkcode==""){
			$("#valid-msg-node").show();
			$("#valid-msg-node").html("<span>验证码不能为空!</span>");
			$("#checkcode").css("border","1px solid #ff6600");
			$("#checkcode").focus();
			return false;
		}else{
			$("#checkcode").css("border","1px solid green");
			$("#valid-msg-node").html("<span>验证码已输入!</span>");
		}
		$("#fm-login-submit").html("正在登录中...请稍候!");
		//$("#fm-login-submit").attr("disabled","disabled");
		return true;
		/*
		$.ajax({
		url:"index.php?s=/Home/User/ajaxLogin/",
		type:"POST",
		data:"email/"+email+"/pwd/"+$.md5(pwd)+"/checkcode/"+checkcode+"/tp/"+new Date().getTime(),
		dataType:"JSON",
		success:function(json){
			if(json.code=="Success"){
				$("#valid-msg-node").html(json.info);
				window.location.href="/";
			}else{
				$("#valid-msg-node").html(json.info);	
			}
		}
				
		});
		*/
		//ajax提交 md5加密pwd
		
		

}
$(document).ready(function(){
photoIndexList();
$("#fm-login-submit").click(function(){
	chkPost();
});


});
</script>
<?php
}
?>



<?php
if(isset($_SESSION['Login_flag'])){
?>
<div class="container">


<div style="width:100%; position:relative">
<ul class="nav nav-tabs">
<?php
    //根据默认BabyID决定显示内容
   // print_r($_SESSION['session_fb']);
foreach($_SESSION['session_fb'] as $k=>$v){

 if($v['baby_id']==$_SESSION['session_babyid']){
 $class=' class="active"';
 }else{
 $class="";
 }
 ?>
 
<li<?php echo $class;?>><a href="/index.php?s=/Home/Baby/mine/babyid/{$v['baby_id']}">
<?php
echo $v['baby_realname'].'<small>'.$v['baby_nickname'].'</small>';
?>    
    </a></li>    	
<?php

    }
   
    ?>
	
</ul>

<span style="position:absolute;right:0px;top:2px;">
<script type="text/javascript">
function dochange(v){
	location.href='/index.php?s=/Home/Index/index/year/'+v;
}
</script>
<?php
if(!is_null($borndate)){
$bornyear = date("Y",$borndate);
?>
<select onChange="dochange(this.options[this.selectedIndex].value)">
<?php
if($pregnant==1){
//怀孕

}else{
//已出生

} 
	

  for(;$current_year>=$bornyear;$current_year--){
  ?>
  <?php
  if($current_year==$year){
  ?>
    <option value="<?php echo $current_year;?>" selected><?php echo $current_year;?></option>
    <?php
    }else{
    ?>
    <option value="<?php echo $current_year;?>"><?php echo $current_year;?></option>
    <?php
    }
    ?>
  <?php
  }
  ?>
</select>
<?php
}else{
	echo '您还没有完善宝宝出生年月，请往<a href="/index.php?s=/Home/Baby/Profile">Baby信息</a>!';
}
?>

</span>

</div>

<div class="gallery_index">
<div class="span4 pull-right" style="width:275px; margin-left:5px;">
  

<div class="child-intrduce">
<dl class="user">
	<dt class="m_thumb_d">
    	<a href="index.php?s=/Home/Baby/Profile" class="user-avatar"><img src="{$current_baby['baby_icon']}"></a>
    </dt>
    <dd class="user_info">
    	
        <div class="static_num">
        
        <dl>
					<dt><a href="index.php?s=/Home/Baby/Timeline" target="_blank">{$photo_count}</a></dt>
					<dd><a href="index.php?s=/Home/Baby/Timeline" class="M_linkb" target="_blank">照片</a></dd>
				</dl>
                
        <dl class="M_dotted_y">
					<dt><a onClick="LikeDialog()" href="javascript:void(0)">{$like_count}</a></dt>
					<dd><a onClick="LikeDialog()" href="javascript:void(0)" class="M_linkb"><i class="icon-thumbs-up"></i>喜欢</a></dd>
				</dl>
         
         <dl class="M_dotted_y">
					<dt><a onClick="FoucsDialog()" href="javascript:void(0)">{$focus_count}</a></dt>
					<dd><a onClick="FoucsDialog()" href="javascript:void(0)" class="M_linkb">关注</a></dd>
				</dl>       
                
                        
        
        </div>
        <div>
 
    <a href="/index.php?s=/Home/Albums/qiniupload" class="btn btn-block btn-success pull-right">上传相片</a>
 
</div>
    </dd>
   
</dl>


</div>


<?php
if($pregnant==1){
//已出生
if(!empty($borndate)){
?>
<div class="box">
<div class="title-bar">
<h2>孕育周刊</h2>
</div>
<!--title-bar-->
<div class="box-content">
<div class="content-detail">
	<div class="content-dt-weekly">
<?php
$baby_borndate = date("Y-m-d",$borndate);

$born_till_now = format($baby_borndate,date("Y-m-d",time()));

$yearly = $born_till_now['yearly'];
$monthly = $born_till_now['monthly'];
$daily = $born_till_now['daily'];
$total_day = ($born_till_now['weekly']*7+$born_till_now['daily']);
$born_notice = '';
if(!empty($yearly)){
	$born_notice .= $yearly.'岁';
}

if(empty($monthly)){
//不足一个月的天数
//直接显示天数
    if($total_day>0){
    $born_notice .= $total_day."天了";
    }
}else{
    if($daily==0){
    $born_notice .= $monthly."个月了";
    }else{
    $born_notice .= $monthly."个月".$total_day.'天了';
    }
    
}
echo '<strong>您的宝宝已经'.$born_notice.'</strong>';
//♀♂
?>，这里显示更多成长提示内容...
<!--[<a href="#">阅读更多</a>]
-->
<hr>
</div>

    
    
</div>
<!--content-detail-->
</div><!--box-content-->

</div><!--end box-->
<?php
}else{
echo '请设置宝宝出生日期!';
}
}else{
//怀孕中
echo '怀孕中';
}
?>

</div>
<div class="guess-list span8" style="width:654px;background:#fff">
<div class="group">
  

<?php
$month = 1;
for(;$month<=12;$month++){
?>
<div class="item-c">

      

<div class="title">
<div class="badge badge-success" style="margin:12px 25px 0 25px"><?php echo $month;?>月</div><a href="/index.php?s=/Home/Baby/Calendar/year/{$year}/month/{$month}" title="以月历形式浏览"><i class="icon-calendar"></i></a>
<!--<div class="source">
</div>-->

</div>

<div class="online-desc">
  <ul class="pics" id="<?php echo $year.'-'.$month;?>"><li><img src="/Public/images/smile.png" ></li></ul>
</div>





<!--<div class="fav-btn">
    <a class="a-show-login" data-tkind="2001" data-tid="11458796" href="http://www.douban.com/online/11458796/">59 <i>♥</i></a>
</div>-->
</div>
<?php
}
?>
</div>


</div>

</div>
</div>
<script type="text/javascript">

function getImgIndex(s){
	//获取gallery图片数目
	var gallery_img  = $("#gallery img")
	var gallery_img_length = gallery_img.length;
	var g_i = 0;
	var ImgIndex = 0;
	var thumb_src = s.replace("imageMogr/v2/auto-orient/thumbnail/800x560","imageView/1/w/64/h/64");
	//alert(thumb_src+'---'+s);
	
	for(;g_i<gallery_img_length;g_i++){
		
		if(thumb_src==gallery_img[g_i].src){
			
			ImgIndex = g_i;
			break;
		}
	}
	
	return ImgIndex;
	
}

function loadCurrentYear(y){
$.ajax({
		url:"/index.php",
		type:"GET",
		data:"s=/Home/Demo/loadcurrentyear/year/"+y+"/tp/"+new Date().getTime(),
		dataType:"json",
		success:function(json){
			var i = 0;
			if(json){
				
			$.each(json,function(dataIndex,data){
				
				var obj = $("#"+data['date']);
				
				obj.html("<li>数据载入中...</li>");
				
				var str = '';
				$.each(data["detail"],function(dindex,detail){
					date_up=new Date(detail['photo_uptime']*1000);
;
					date_up_str = date_up.format("yyyy-MM-dd");
					if(date_up_str=="<?php echo date("Y-m-d",time());?>"){
					str+='<li style="position:relative"><i style="position:absolute;right:5px;top:4px;z-index:1000px" class="icon-circle-arrow-up"></i><a img_src="http://facesbaby.u.qiniudn.com/'+detail['photo_path']+'?imageView/2/w/800" data_id="'+detail['id']+'" id="'+data['date']+'-'+dindex+'" href="javascript:void(0)" class="img_rel"><img src="http://facesbaby.u.qiniudn.com/'+detail['photo_path']+'?imageView/1/w/50/h/38" width="50" height="38" border="0" class="img" style="visibility: visible;border:1px solid #ff6600"></a></li>';
					}else{
						str+='<li><a img_src="http://facesbaby.u.qiniudn.com/'+detail['photo_path']+'?imageView/2/w/800" data_id="'+detail['id']+'" id="'+data['date']+'-'+dindex+'" href="javascript:void(0)" class="img_rel"><img src="http://facesbaby.u.qiniudn.com/'+detail['photo_path']+'?imageView/1/w/50/h/38" width="50" height="38" border="0" class="img" style="visibility: visible;"></a></li>';
					}
					//alert(str);
				});
				obj.html(str);
				i++;
$("#"+data['date']).find("img").lazyload({effect : "fadeIn",placeholder : "Public/images/grey.gif"});
			});
			 
	$('.img').hover(function () {
                    var $this   = $(this);
                    $this.stop().animate({'opacity':'1.0'},200);
                },function () {
                    var $this   = $(this);
                    $this.stop().animate({'opacity':'0.6'},200);
                });//end hover
			}//end if
			
			$('.img_rel').bind('click',function(){
				showModal($(this).attr('id'));
			});
		}

	
		
	});	
}

loadCurrentYear('{$year}');

var selected_image = '';
var dialog;
var gb_select = 0;var c_src='',c_id='';

function showModal(day){
	//getAlbumByDay
	var current_pic = $('#'+day).attr("img_src");
	if(current_pic!="/Public/images/blank.gif"){
	 dialog = art.dialog({
		lock: true,
		fixed: true,
		title:false,
		content:returnHtml(day),
		id:'modal',
		width:'960px',
		padding:0,
		background: '#000', // 背景色
   	 	opacity: 0.3,	// 透明度
		padding:0
		
	});
	


$('.img_view').fadeIn("slow");
setPreView();


}

}

var global_index = '';
function setPreView(){
var xOffset = 10;//定义x的偏移量 
var yOffset = 20;//定义y的偏移量
var left_or_right = "";	
$(".img_view").mousemove(function(e){ 
var positionX=e.originalEvent.x-$(this).offset().left||e.originalEvent.layerX-$(this).offset().left||0;//获取当前鼠标相对img的x坐标 
var positionY=e.originalEvent.y-$(this).offset().top||e.originalEvent.layerY-$(this).offset().top||0;//获取当前鼠标相对img的y坐标，（以下用不着，可删除） 
var tipTitle;//定义提示标题 
if(positionX<=$(this).width()/2)//当当前鼠标相对x坐标小于图片宽度的一半时执行 
{ 
tipTitle='上一张'; 
$(this).addClass("left-img");
$(this).removeClass("right-img");
left_or_right = "left";
} 
else 
{ 
tipTitle='下一张'; 
$(this).removeClass("left-img");
$(this).addClass("right-img");
left_or_right = "right";
} 
$(this).attr("title","点击跳到"+tipTitle);
}
);

$(".img_view").click(function(e){	
	var gallery_img  = $("#gallery img")
	var gallery_img_length = gallery_img.length;
	global_index = getImgIndex($(this).attr("src"));
	if(global_index<gallery_img_length){
	//在范围内
		if(left_or_right=="left"){
			//上一个
			global_index = global_index-1;
		}else if(left_or_right=="right"){
			//下一个
			global_index = global_index+1;
		}
		
		
		
			if((global_index!=gallery_img_length)||(global_index!=-1)){
			//alert(gallery_img[global_index].src);
			selectView(gallery_img[global_index].src.replace("1/w/64/h/64","2/w/800/h/560"),global_index,gallery_img[global_index].id);
			}else{
				//alert("没有了!");	
			}
		
	}
	
});	
}



function returnHtml(day){
var str = '';
var src = '';
var src_big='',src_thumb='';
src = $('#'+day).attr('img_src');
src_big = src.replace('imageView/2/w/800','imageMogr/v2/auto-orient/thumbnail/800x560');
src_thumb = src.replace('imageView/2/w/800','imageMogr/v2/auto-orient/thumbnail/800x560/quality/15');

var html = '';
html+='<div class="bigPhoto" style="z-index:8006;opacity:0.5;filter:alpha(opacity=50);"><img src="'+src_thumb+'"></div>';
html+='<div class="pic-load"><img src="Public/images/pic-load.gif"></div>';
html+='<div class="bigPhoto" style="z-index:8008;background:none"><img src="'+src_big+'" data-json=\'{"":""}\' data_id="'+$('#'+day).attr('data_id')+'" id="viewpic_'+day+'" class="img_view" /></div>';

$('#_slideView_imgContainer').html(html);


//getAlbumByDay(day);
str = $('#bootDialog').html();

//gallery
//AJAX获取当月的所有图片数据
var day_obj = day.split("-");
LoadMonthPic(day_obj[0],day_obj[1],src_big);
loadImgInfo($('#'+day).attr('data_id'));

return str;
}
function LoadMonthPic(y,m,s){
	var month_str = '';
	var dstr = '';
	$.ajax({
	url:"/index.php",
		type:"GET",
		data:"s=/Home/Demo/loadmonth/date/"+y+"-"+m+"/tp/"+new Date().getTime(),
		dataType:"json",
		success:function(json){
			if(json){
			$.each(json,function(dataIndex,data){
				
				
				if(s=="http://facesbaby.u.qiniudn.com/"+data['photo_path']+"?imageMogr/v2/auto-orient/thumbnail/800x560"){
					gb_select = dataIndex;
					month_str += '<li><a id="thumb_'+dataIndex+'" data_id="'+data['id']+'" onclick="selectView(\'http://facesbaby.u.qiniudn.com/'+data['photo_path']+'?imageView/2/w/800/h/560\',\''+dataIndex+'\',\''+data['id']+'\')" class="link_view" href="javascript:void(0)"><img src="http://facesbaby.u.qiniudn.com/'+data['photo_path']+'?imageView/1/w/64/h/64"  id="'+data['id']+'"></a></li>';
					$("#likeVal").attr("value",data['id']);
					dstr = "http://facesbaby.u.qiniudn.com/"+data['photo_path']+"?imageMogr/v2/auto-orient/thumbnail/800x560";
				}else{
					month_str += '<li><a id="thumb_'+dataIndex+'" data_id="'+data['id']+'" onclick="selectView(\'http://facesbaby.u.qiniudn.com/'+data['photo_path']+'?imageView/2/w/800/h/560\',\''+dataIndex+'\',\''+data['id']+'\')" href="javascript:void(0)"><img src="http://facesbaby.u.qiniudn.com/'+data['photo_path']+'?imageView/1/w/64/h/64" id="'+data['id']+'"></a></li>';
				}
				
				
			});
			}
			
			var total_width = 64*(json.length+1);
			$("#gallery").width(total_width);
			$("#gallery").html(month_str);
			roll_thumb(parseInt(getImgIndex(dstr)));
		}//end success
	});//end ajax
}
function selectView(s,di,id){
//$("#likeVal").attr("value",id);
	if(gb_select==di){
		
	}else{
		$("#thumb_"+gb_select).removeClass("link_view");
		$("#thumb_"+di).addClass("link_view");
	}
	roll_thumb(parseInt(di));
var src_big='',src_thumb='';	
src_big = s.replace('imageView/2/w/800/h/560','imageMogr/v2/auto-orient/thumbnail/800x560');
src_thumb = s.replace('imageView/2/w/800/h/560','imageMogr/v2/auto-orient/thumbnail/800x560/quality/15');
	
	var html = '';
html+='<div class="bigPhoto" style="z-index:8006;opacity:0.5;filter:alpha(opacity=50);"><img src="'+src_thumb+'"></div>';
html+='<div class="pic-load"><img src="Public/images/pic-load.gif"></div>';
html+='<div class="bigPhoto" style="z-index:8008;background:none"><img src="'+src_big+'" data-json=\'{"":""}\' class="img_view" /></div>';// data_id="'+$('#'+day).attr('data_id')+'" id="viewpic_'+day+'"

	$('#_slideView_imgContainer').html(html);
	$('.img_view').fadeIn("slow");	
	gb_select = di;
	loadImgInfo(id);
	setPreView();
}
function loadImgInfo(id){
//AJAX获取相片的相关评论内容
	//opacity:1; likeBtn
	getPhotoDt(id);
	getLike(id);//获取是否赞
	likelist(id);//获取列表
	//列表评论
	listcomment(id);
	$('#likeVal').val(id);
}
function getPhotoDt(id){
	$.ajax({
	url:'/index.php',
	type:'GET',
	data:'s=/Home/Albums/PhotoDt/photoid/'+id,
	dataType:'json',
	success:function(json){
		var shootingdate = new Date(json['photo_createdate']*1000);
		$('#dateDetail').html(shootingdate.format("yyyy-MM-dd hh:mm:ss"));
		$('#photo_topic').html(json['photo_topic']);
		
		
		
	}
	});
}
 
function likelist(id){
	$.ajax({
	url:"/index.php",
	type:"GET",
	data:"s=/Home/Index/likelist/photoid/"+id+"/tp/"+new Date().getTime(),
	dataType:"json",
	success:function(json){
		if(json){
			var str = '';
			$.each(json,function(dataIndex,data){
				str+='<li><a href="index.php?s=/Home/User/Page/uid/'+data.user_id+'" target="_blank"><i class="icon-heart"></i>'+data.username+'</a></li>';
			});
			$("#dropdown-menu").html(str);
		}
	}
	});
}
function getLike(id){
	//$("#likeVal").attr("value",id);
	$.ajax({
		url:"/index.php",
		type:"GET",
		data:"s=/Home/Demo/getLike/photoid/"+id+"/tp/"+new Date().getTime(),
		dataType:"json",
		success:function(json){
			if(json){
				if(json['likeit']==1){
					$("#likeBtn").css('opacity','1');
				}else{
					$("#likeBtn").css('opacity','0.5');
				}
				var like_count = json['like_count'];
				if(like_count!=0){
				$('#likeit_num').html(json['like_count']);
				}else{
					$('#likeit_num').html('');
				}
			}else{
				$("#likeBtn").css('opacity','0.5');
			}
		}
			
	});
}

function Like(obj){
	var opacity = $('#likeBtn').css("opacity");
	var url = '';
	var id = $('#likeVal').val();
	

	if(opacity==0.5){
		url = 's=/Home/Demo/like/photoid/'+id+'/babyid/{$current_baby["baby_id"]}/tp/'+new Date().getTime();
	}else{
		url = 's=/Home/Demo/unlike/photoid/'+id+'/babyid/{$current_baby["baby_id"]}/tp/'+new Date().getTime();
	}
	
	$.ajax({
		url:"/index.php",
		type:"GET",
		data:url,
		dataType:"json",
		success:function(json){
			
			if(json['flag']==1){
				
				if(opacity==0.5){
					$('#likeBtn').css("opacity","1");
				}else{
					$('#likeBtn').css("opacity","0.5");
				}
				var like_count = json['like_count'];
				if(like_count!=0){
				$('#likeit_num').html(like_count);
				}else{
					$('#likeit_num').html('');
				}
			}
		}
	});
}
var pre_i = 0;	
function roll_thumb(di){
	var i=0;
	var gallery_li  = $("#gallery li")//获得缩略图列表对象
	var gallery_li_length = gallery_li.length;//获得所有缩略图相片
	if(di<gallery_li_length){
	var j=di;
var movePos = ((44)*(-di));//

$("#gallery").animate({left:movePos},400); 	

	
	}
}
</script>
<?php
}
?>




<include file="./template/default/Public/footer-logined.html" />


</body>
</html>